<?php
include "include/config.inc.php";
error_reporting(0);

if(!isset($_SESSION['s_activId']))
{
  header('location:index.php');
}
$today = date("d-m-Y");

if(isset($_POST['cloasingBalanceTxt']) && $_POST['cloasingBalanceTxt'] != "")
{
	$currentDate = $_POST['curDateYear']."-".$_POST['curDateMonth']."-".$_POST['curDateDay'];
	$amount = $_POST['cloasingBalanceTxt'] ;
	$note = $_POST['cloasingNoteTxt'] ;
  $insertRojmel = "INSERT INTO rojmel(`date`,`amount`,`debitCredit`,`accountId`,`note`)
                         VALUE ('".$currentDate."',".$amount.",'Dr',1,'".addslashes($note)."')";
  $insertRojmelRes = mysql_query($insertRojmel);
}
include("bottom.php");
$smarty->assign("today",$today);
$smarty->display('cloasingBalance.tpl');  
?>